@use 'src/styles/abstracts' as *;

.SelectForm {
  flex: 1;
  padding: 0.725rem 1.5em;
  display: flex;

  &__container__metrics {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-right: 1rem;
    /* TODO [GA]: Override MUI default styles in a nice way */
    .MuiBox-root {
      justify-content: flex-start;
    }
  }
  &__container__search {
    width: 103px;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
  }
  &__Popper {
    border: $border-main;
    width: 40%;
    border-radius: $radius-main;
    z-index: 6;
    color: #586069;
    background-color: #ffffff;
    .MuiAutocomplete-paper {
      box-shadow: unset;
      margin: unset;
    }
  }
  &__metric__select {
    width: 100%;

    input {
      padding: 0.5rem;
      font-size: $text-md;
      border-bottom: $border-main;
    }
  }
  &__TextField {
    position: relative;
  }
  &__textarea {
    flex: 1;
    .MuiOutlinedInput-multiline.MuiOutlinedInput-marginDense {
      padding-top: toRem(7.5px);
      padding-bottom: toRem(7.5px);
    }
  }
  &__search__button {
    width: 100%;
  }
  &__search__actions {
    display: flex;
    justify-content: space-between;

    button {
      border: $border-main;
      &:nth-child(2) {
        margin: 0 0.25rem;
      }
      &.active {
        border: $border-main-active;
        background-color: $primary-color-5;
      }
    }
  }
  &__clearAll {
    height: 24px;
    width: 24px;
    background: #e8f1fc;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    &.disabled {
      opacity: 0.5;
    }
    &:after {
      content: '';
      position: absolute;
      width: 20px;
      height: 34px;
      background: rgba(255, 255, 255, 0.5);
      background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 1) 92%
      );
      left: -20px;
      top: -5px;
      border-radius: 0;
      color: white;
      pointer-events: none;
    }

    i {
      color: #1473e6;
      font-size: 10px;
    }
  }
  &__tags {
    display: flex;
    align-items: center;
    overflow: auto;
    max-width: calc(100vw - 33rem);
    min-width: 12rem;

    .Badge {
      margin-right: 0.5rem;
      &:last-child {
        margin-right: 20px;
      }
    }
  }
}
